import request from '@/utils/request'
export function toLogin(name: string, password: string) {
  const data = {
    name,
    password
  }
  return request({
    url: '/login/verify',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}
export function getUser(userId: number) {
  return request({
    url: '/user/detail',
    method: 'get',
    params: { id: userId }
  })
}
// 获取验证码
export function getCodeImg() {
  return request({
    url: '/login/captchaImage',
    headers: {
      isToken: false
    },
    method: 'get'
  })
}
